home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / controller.dir / Internal_48_Mute Button.ls < prev    next >
Encoding:
Text File  |  2004-12-29  |  1015 b   |  37 lines

  1. on mouseDown
  2.   global gAllMute, gSavedSoundLevel
  3.   puppetSound("mute/unmute sound")
  4.   vorigMember = the member of sprite the clickOn
  5.   set the member of sprite the clickOn to member("mute sound dn")
  6.   updateStage()
  7.   repeat while the stillDown
  8.     nothing()
  9.   end repeat
  10.   set the member of sprite the clickOn to vorigMember
  11.   updateStage()
  12.   if gAllMute = 0 then
  13.     set the member of sprite the clickOn to member("sound muted button")
  14.     gSavedSoundLevel = the soundLevel
  15.     set the soundLevel to 0
  16.     gAllMute = 1
  17.   else
  18.     set the member of sprite the clickOn to member("sound on button")
  19.     set the soundLevel to gSavedSoundLevel
  20.     gAllMute = 0
  21.   end if
  22. end
  23.  
  24. on mouseEnter me
  25.   if the member of sprite me.spriteNum = member("sound on button") then
  26.     set the member of sprite 23 to member("mute sound prompt")
  27.   else
  28.     set the member of sprite 23 to member("unmute sound prompt")
  29.   end if
  30.   updateStage()
  31. end
  32.  
  33. on mouseLeave
  34.   set the member of sprite 23 to member("blank prompt")
  35.   updateStage()
  36. end
  37.